﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Untitled Page</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
  <script src="js/jquery-2.1.0.js"></script>
  <script src="js/script.js"></script>
  <link rel="stylesheet" href="bootstrap/css/iconfont.css" >
  <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" >
  <!--<script src="Top.files/script.js"></script>-->
<STYLE type=text/css> 
{
	FONT-SIZE: 12px
}
.gridView {
	BORDER-RIGHT: #bad6ec 1px; BORDER-TOP: #bad6ec 1px; BORDER-LEFT: #bad6ec 1px; COLOR: #566984; BORDER-BOTTOM: #bad6ec 1px; FONT-FAMILY: Courier New
}
.gridViewHeader {
	BORDER-RIGHT: #bad6ec 1px solid; BORDER-TOP: #bad6ec 1px solid; BACKGROUND-IMAGE: url(../images/bg_th.gif); BORDER-LEFT: #bad6ec 1px solid; LINE-HEIGHT: 27px; BORDER-BOTTOM: #bad6ec 1px solid
}
.gridViewItem {
	BORDER-RIGHT: #bad6ec 1px solid; BORDER-TOP: #bad6ec 1px solid; BORDER-LEFT: #bad6ec 1px solid; LINE-HEIGHT: 32px; BORDER-BOTTOM: #bad6ec 1px solid; TEXT-ALIGN: center
}
.cmdField {
	BORDER-RIGHT: 0px; BORDER-TOP: 0px; BACKGROUND-IMAGE: url(../images/bg_rectbtn.png); OVERFLOW: hidden; BORDER-LEFT: 0px; WIDTH: 67px; COLOR: #364c6d; LINE-HEIGHT: 27px; BORDER-BOTTOM: 0px; BACKGROUND-REPEAT: repeat-x; HEIGHT: 27px; BACKGROUND-COLOR: transparent; TEXT-DECORATION: none
}
.buttonBlue {
	BORDER-RIGHT: 0px; BORDER-TOP: 0px; BACKGROUND-IMAGE: url(../images/bg_button_blue.gif); BORDER-LEFT: 0px; WIDTH: 78px; COLOR: white; BORDER-BOTTOM: 0px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 21px
}
</STYLE>
<META content="MSHTML 6.00.2900.5848" name=GENERATOR>
</HEAD>
<BODY 
style="BACKGROUND-POSITION-Y: -120px; BACKGROUND-IMAGE: url(../images/bg.gif); BACKGROUND-REPEAT: repeat-x">
<SCRIPT type=text/javascript>
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
    theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</SCRIPT>
<SCRIPT src="EmployeeMgr.files/WebResource.axd" type=text/javascript></SCRIPT>
<SCRIPT src="EmployeeMgr.files/ScriptResource.axd" 
type=text/javascript></SCRIPT>
<SCRIPT 
src="EmployeeMgr.files\ScriptResource(1).axd" 
type=text/javascript></SCRIPT>
<DIV>
  <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>
      <TR 
  style="BACKGROUND-IMAGE: url(../images/bg_header.gif); BACKGROUND-REPEAT: repeat-x" 
  height=47>
        <TD width=10><SPAN 
      style="FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hl.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN></TD>
        <TD><SPAN 
      style="FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hl2.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN><SPAN 
      style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hb.gif); PADDING-BOTTOM: 10px; COLOR: white; PADDING-TOP: 10px; BACKGROUND-REPEAT: repeat-x; HEIGHT: 47px; TEXT-ALIGN: center; 0px: ">学生管理 </SPAN><SPAN
      style="FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hr.gif); WIDTH: 60px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN></TD>
        <TD 
    style="BACKGROUND-POSITION: 50% bottom; BACKGROUND-IMAGE: url(../images/main_rc.gif)" 
    width=10></TD>
      </TR>
      <TR>
        <TD style="BACKGROUND-IMAGE: url(../images/main_ls.gif)">&nbsp;</TD>
        <TD 
    style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; COLOR: #566984; PADDING-TOP: 10px; BACKGROUND-COLOR: white" 
    vAlign=top align=middle>

          <form class="form-inline float-left" >
            <div class="form-group">
              <input type="text" id="name" name="name"  class="form-control" placeholder="姓名">
            </div>
            <button type="button" onclick="querys(1)" class="btn btn-info"><i class="iconfont"></i>搜索</button>
          </form>

          <DIV>

            <TABLE class=gridView id=ctl00_ContentPlaceHolder2_GridView1 
      style="WIDTH: 100%; BORDER-COLLAPSE: collapse" cellSpacing=0 rules=all 
      border=1>

                <TR align="center">
                  <TH align="center" class=gridViewHeader style="WIDTH: 50px" scope=col>&nbsp;</TH>
                  <TH  align="center" class=gridViewHeader scope=col>ID</TH>
                  <TH  align="center" class=gridViewHeader scope=col>姓名</TH>
                  <TH align="center" class=gridViewHeader scope=col>班级</TH>
                  <TH align="center" class=gridViewHeader scope=col>性别</TH>
                  <TH  align="center" class=gridviewHeader scope=col>地址</TH>
                  <TH align="center" class=gridviewHeader scope=col>操作</TH>

                </TR>

              <TBODY id="id">
              </TBODY>
            </TABLE>
            <div class="page">
              <span class="total float-left page-link" id="tiao">共23223条</span>
              <span class="total float-left page-link" id="ye">共23223页</span>

              <ul class="pagination">
                <input type="hidden" id="pageNo">
                <li class="page-item"><a class="page-link" href="javascript:beforPage();">上一页</a></li>
                <!-- <li class="page-item"><a class="page-link" href="avascript:page('+a+');">a</a></li>
          -->
                <li class="page-item"><a class="page-link" href="javascript:nextPage();">下一页</a></li>
              </ul>


            </div>

            <a class="btn btn-info float-right" href="add.html"><i class="iconfont"></i>新增</a>
          </DIV>
        </TD>
        <TD style="BACKGROUND-IMAGE: url(../images/main_rs.gif)"></TD>
      </TR>
      <TR 
  style="BACKGROUND-IMAGE: url(../images/main_fs.gif); BACKGROUND-REPEAT: repeat-x" 
  height=10>
        <TD style="BACKGROUND-IMAGE: url(../images/main_lf.gif)"></TD>
        <TD style="BACKGROUND-IMAGE: url(../images/main_fs.gif)"></TD>
        <TD 
style="BACKGROUND-IMAGE: url(../images/main_rf.gif)"></TD>
      </TR>
    </TBODY>
  </TABLE>

</DIV>

</BODY>
<SCRIPT type=text/javascript>
//<![CDATA[
Sys.Application.initialize();
$(function(){
  querys(1);
})
function beforPage() {
  var b =parseInt($("#pageNo").val()) - 1;
  if(b < 1) {b =1 }
  querys(b);
}
function nextPage() {
  var b =parseInt($("#pageNo").val()) + 1;
  querys(b);
}
function querys(a) {
  var name = $("#name").val();
  //查询的ajax
  $.ajax({
    type: "POST",
    url: baseUrl + "/yangliu!queryPage",
    dataType: "json",
    data: {"name": name,"pageNo":a},
    success: function (res) {
        var _tr = '';
        $("#id").empty();
        $.each(res.data,function (i, v) {
          _tr = _tr + '<tr><td class=gridViewItem style="WIDTH: 50px"><IMG src="EmployeeMgr.files/bg_users.gif"></td>' +
                  '<TD class=gridViewItem>'+v.id+'</TD>' +
                  '<TD class=gridViewItem>'+v.name+'</TD>' +
                  '<TD class=gridViewItem>'+v.bname+'</TD>' +
                  '<TD class=gridViewItem>'+v.sex+'</TD>' +
                  '<TD class=gridViewItem>'+v.address+'</TD>' +
                  '<TD class=gridViewItem><a href="add.html?'+v.id+'">修改</a>|<a href="javascript:del('+v.id+');">删除</a></TD></tr>';
        });
        $("#id").append(_tr);
        $("#tiao").text('共'+res.totalCount+'条');
        $("#ye").text('共'+res.totalPage+'页');
        $("#pageNo").val(res.currentPage);

    },
    error: function (data) {
      alert("异常");
    }
  });
}
function  del(e){
  $.ajax({
    type: "post",
    url: baseUrl + "/yangliu!del",
    data: {"yangliu.id":e},
      success: function (res) {
        window.location.reload();
      }

  })
}
//]]>
</SCRIPT>


</HTML>
